﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - OpenPms</title>
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
    <link href="~/lib/fontawesome-free-5.15.4-web/css/all.css" rel="stylesheet" />
    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
    <link rel="stylesheet" href="~/OpenPms.styles.css" asp-append-version="true" />
</head>
<body>
    <header>
        <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-dark bg-dark fixed-top">
            <div class="container-fluid">
                <a class="navbar-brand" asp-area="D" asp-page="/Index">@(TempData.Peek("CorpName")?.ToString() ?? "首页")</a>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
                    <ul class="navbar-nav">
                        <li class="nav-item"><a id="LiRoomType" class="nav-link" asp-page="/Setup/RoomType">房型</a></li>
                        <li class="nav-item"><a id="LiRoom" class="nav-link" asp-page="/Setup/Room">房间</a></li>
                        <li class="nav-item"><a id="LiRate" class="nav-link" asp-page="/Setup/Rate/Index">房价码</a></li>
                        <li class="nav-item"><a id="LiUser" class="nav-link" asp-page="/Setup/User/Index">用户</a></li>
                        <li class="nav-item"><a id="LiWXMsg" class="nav-link" asp-page="/Setup/WXMsg/Index">微信消息</a></li>
                    </ul>
                    <partial name="_LoginPartial" />

                </div>
            </div>
        </nav>
    </header>
    <main role="main" class="container-fluid pb-3" style="margin-top:70px">
        @RenderBody()
    </main>

    <footer class="border-top footer text-muted">
        <div class="container-fluid">
            &copy; 2023 - OpenPms
            <a href="javascript:;" onclick="nav()">移动版</a>
        </div>
    </footer>


    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="~/js/site.js" asp-append-version="true"></script>

    <script>
        const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
        const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))


        $(function () {
            var p = "@(Model.Request.RouteValues["Page"].ToString().Split('/')[2])";
            var id = $("#Li" + p);
            if (!id.length)
                id = $("#LiHome")
            id.addClass("active");

        });
        function nav() {
            document.location = `/M${"@(Model.Request.RouteValues["Page"].ToString() + Model.Request.QueryString)"}`;
        }
    </script>
    @await RenderSectionAsync("Scripts", required: false)

</body>
</html>